#ifndef __EXT_BIT_SOURCE_H__
#define __EXT_BIT_SOURCE_H__ 1

#include "types.h"
#include "stegio.h"

/**
 * @brief abstract steg payload bit source
 * @author gpitsch and rpoisel
 */
class IExtBitSource
{
public:
	IExtBitSource() { }
	virtual ~IExtBitSource() { }

	enum EBitValue
	{
		BIT_EOF = 0, // no more data will ever come -> shutdown
		BIT_NEW_PREAMBLE,
		BIT_NONE,
		BIT_FALSE,
		BIT_TRUE,
	};

	/**
	 * bit from protocol layer to embedding-engine for embedding.
	 */
	virtual EBitValue getBit() = 0;

	/**
	 * bit from stego-stream to protocol layer.
	 * this methode will be called by a embedding engine after extracting a bit.
	 *
	 * @param pBitValue Value which should be stored
	 * @param pFirstBit Is true if it is the first bit after the preamble
	 */
	virtual void putBit(bool pBitValue, bool pFirstBit) = 0;

	/**
	 * get maximum number of bits which are possible between two preambles
	 */
	virtual unsigned int getMaxFrameLength() = 0;
};

#endif // __EXT_BIT_SOURCE_H__
